package com.javasm.adminapi.common;

import lombok.Data;

@Data
public class R {

    private Integer code;
    private String msg;

    private Object data;

    public static R ok(){
        return ok(null);
    }

    public static R ok(Object object){
        R r = new R();
        r.setCode(200);
        r.setMsg("success");
        if (object != null)
            r.setData(object);
        return r;
    }
}
